import os
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
####### sms #######
#腾讯云短信app id
TENCENT_SMS_APP_ID=1400302209
#腾讯云短信app key
TENCENT_SMS_APP_KEY='8cc5bf076454953306eb668187930004'
#腾讯云短信 签名
TENCENT_SMS_SIGN='python之路'
#腾讯云短信 模板
TENCENT_SMS_TEMPLATE={
    'register':None,
    'login':2211,
}
####腾讯cos  id和key #####
TENCENT_COS_ID='AKIDsZ0A3f16wYtylHXXHlyvb074k9I9k47t'
TENCENT_COS_KEY='YooX0B5i49xVllUw73i7F6h02nIWUAaj'
#redis
CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        "LOCATION": "redis://127.0.0.1:6379",
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
            "CONNECTION_POOL_KWARGS": {
                "max_connections": 1000,
                "encoding": 'utf-8'
            },
            # "PASSWORD": "" # redis密码
        }
    }
}

###### alipay#######

ALI_APPID=2021000118608900
ALI_NOTIFY_URL='http://127.0.0.1:8000/pay/notify/'
ALI_RETURN_URL='http://127.0.0.1:8000/pay/notify/'
ALI_PRI_KEY_PATH=open(os.path.join(BASE_DIR,'files/privite.txt')).read()
ALI_PUB_KEY_PATH=open(os.path.join(BASE_DIR,'files/public.txt')).read()
ALI_GATEWAY='https://openapi.alipaydev.com/gateway.do'